<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./libs/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- 第一个变量代表数组中的每一项元素，第二个变量数组中代表元素下标，对象中代表key -->
        <!-- 循环数组 -->
        <h1 v-for="(item,index) in arr">{{index}}=={{item}}</h1>
        <hr>
        <!-- 循环对象 -->
        <h1 v-for="(item,key,index) in obj">{{index}}=={{key}}=={{item}}</h1>
        <hr>
        <!-- 循环字符串 -->
        <h1 v-for="(item,index) in str">{{index}}=={{item}}</h1>
        <hr>
        <!-- 循环数值 -->
        <h1 v-for="(item,index) in num">{{index}}=={{item}}</h1>
    </div>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                arr:['奔驰','宝马','奥迪','大众'],
                obj:{
                    id:1,
                    name:'张三',
                    age:33
                },
                str:'hello',
                num:10
            }
        })
    </script>
</body>
</html>